//index.js
//获取应用实例
const app = getApp()

Page({
  data: {
      list1:[
       {name:"it",
         conttent:[
           {type:"前端"},
           {type:"前端"},
           {type:"前端"},
           {type:"前端"},
           {type:"后端"}
         ]
      } ,
        {name:'服务',
        conttent:[
          {type:"餐饮"},
          {type:"餐饮"},
          {type:"餐饮"},
          {type:"餐饮"},
          {type:"收银"}
        ]
      },
        {name:'教育',
        conttent:[
          {type:"化学"},
          {type:"化学"},
          {type:"化学"},
          {type:"物理"}
        ]
      }, 
      {name:"it",
      conttent:[
        {type:"前端"},
        {type:"前端"},
        {type:"前端"},
        {type:"前端"},
        {type:"后端"}
      ]
   } ,
     {name:'服务',
     conttent:[
       {type:"餐饮"},
       {type:"餐饮"},
       {type:"餐饮"},
       {type:"餐饮"},
       {type:"收银"}
     ]
   },
     {name:'教育',
     conttent:[
       {type:"化学"},
       {type:"化学"},
       {type:"化学"},
       {type:"物理"}
     ]
   }, 
   {name:"it",
   conttent:[
     {type:"前端"},
     {type:"前端"},
     {type:"前端"},
     {type:"前端"},
     {type:"后端"}
   ]
} ,
  {name:'服务',
  conttent:[
    {type:"餐饮"},
    {type:"餐饮"},
    {type:"餐饮"},
    {type:"餐饮"},
    {type:"收银"}
  ]
},
  {name:'教育',
  conttent:[
    {type:"化学"},
    {type:"化学"},
    {type:"化学"},
    {type:"物理"}
  ]
}, 
{name:"it",
conttent:[
  {type:"前端"},
  {type:"前端"},
  {type:"前端"},
  {type:"前端"},
  {type:"后端"}
]
} ,
{name:'服务',
conttent:[
 {type:"餐饮"},
 {type:"餐饮"},
 {type:"餐饮"},
 {type:"餐饮"},
 {type:"收银"}
]
},
{name:'教育',
conttent:[
 {type:"化学"},
 {type:"化学"},
 {type:"化学"},
 {type:"物理"}
]
}, 
      
      ],
      types:"",
      indexs:0

  },
  aaa(e){
     console.log(e)
     this.setData({
       'types':this.data.list1[e.target.dataset.index].conttent,
       'indexs':e.target.dataset.index
     })
  },
 
  //事件处理函数
  
  onLoad: function () {
    var that=this
    that.setData({
      'types':that.data.list1[0].conttent,
    })
  }
})
